import java.util.Date;

import com.ant.myagile.*
import com.ant.myagile.backlog.*
import com.ant.myagile.dashboard.*
class BootStrap {

    def init = { servletContext ->
//
//        /**
//         * INIT TWO ROLES IN MY-AGILE
//         * ADMIN_ROLE & USER_ROLE
//         */
//        def userRole = Role.findByAuthority("ROLE_USER") ?: new Role(authority: "ROLE_USER").save(failOnError: true)
//
//        /**
//         * INIT 20 MEMBERS
//         * 1 ADMIN_ROLE MEMBER, 13 USER_ROLE MEMBERS, 1 MEMBER NOT ENABLE YET 
//         */
//        def vinhNguyenDang = new Member(username: "vinh.nguyendang@axonactive.vn", password: "admin", enabled: true,
//        firstName: "Vinh", lastName: "Nguyá»…n Ä�áº·ng Quang", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "ndqvinh2109", position: "Junior Java Developer", avatar: "8.jpg", mobile: "0908762443").save(failOnError: true)
//        if (!vinhNguyenDang.authorities.contains(userRole)) {
//            MemberRole.create vinhNguyenDang, userRole
//        }
//
//        def sebi = new Member(username: "sebastian.sussmann@axonactive.vn", password: "123456", enabled: true,
//        firstName: "Sebastian", lastName: "Sussmann", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "sebastian.sussmann.home", position: "Chief Information Manager", avatar: "15.jpg", mobile: "01239911602").save(failOnError: true)
//        if (!sebi.authorities.contains(userRole)) {
//            MemberRole.create sebi, userRole
//        }
//
//        def huyNguyen = new Member(username: "huy.nguyen@axonactive.vn", password: "123456", enabled: true,
//        firstName: "Huy", lastName: "Nguyá»…n Quá»‘c", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "huyedumgr", position: "Education Manager", avatar: "16.jpg", mobile: "0908428246").save(failOnError: true)
//        if (!huyNguyen.authorities.contains(userRole)) {
//            MemberRole.create huyNguyen, userRole
//        }
//
//        def hieuLam = new Member(username: "hieu.lam@axonactive.vn", password: "123456", enabled: true,
//        firstName: "Hiáº¿u", lastName: "LÃ¢m PhÃºc", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "phuchieuct", position: "Junior Java Developer", avatar: "2.jpg", mobile: "01239911602").save(failOnError: true)
//        if (!hieuLam.authorities.contains(userRole)) {
//            MemberRole.create hieuLam, userRole
//        }
//
//        def khangLe = new Member(username: "khang.le@axonactive.vn", password: "123456", enabled: true,
//        firstName: "Khang", lastName: "LÃª An", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "raffin0901", position: "Junior Java Developer", avatar: "3.jpg", mobile: "0972731980").save(failOnError: true)
//        if (!khangLe.authorities.contains(userRole)) {
//            MemberRole.create khangLe, userRole
//        }
//
//        def hanhNguyen = new Member(username: "hanh.nguyen@axonactive.vn", password: "123456", enabled: true,
//        firstName: "Háº¡nh", lastName: "Nguyá»…n Thá»‹ Má»¹", gender: "Female", company: "Axon Active Vietnam", isActive: true,
//        skype: "hanh845", position: "Junior Java Developer", avatar: "4.jpg", mobile: "01689905054").save(failOnError: true)
//        if (!hanhNguyen.authorities.contains(userRole)) {
//            MemberRole.create hanhNguyen, userRole
//        }
//
//        def ngocNguyen = new Member(username: "ngoc.nguyen@axonactive.vn", password: "123456", enabled: true,
//        firstName: "Ngá»�c", lastName: "Nguyá»…n Thá»‹ NhÆ°", gender: "Female", company: "Axon Active Vietnam", isActive: true,
//        skype: "ngoc_nguyen90", position: "Junior Java Developer", avatar: "5.jpg", mobile: "01224986341").save(failOnError: true)
//        if (!ngocNguyen.authorities.contains(userRole)) {
//            MemberRole.create ngocNguyen, userRole
//        }
//
//        def huongNguyen = new Member(username: "huong.nguyenvan@axonactive.vn", password: "123456", enabled: true,
//        firstName: "HÆ°Æ¡ng", lastName: "Nguyá»…n VÄƒn", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "vnnvanhuong", position: "Junior Java Developer", avatar: "6.jpg", mobile: "01665222010").save(failOnError: true)
//        if (!huongNguyen.authorities.contains(userRole)) {
//            MemberRole.create huongNguyen, userRole
//        }
//
//        def vinhNguyenXuan = new Member(username: "vinh.nguyenxuan@axonactive.vn", password: "123456", enabled: true,
//        firstName: "Vinh", lastName: "Nguyá»…n XuÃ¢n", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "xnvinh", position: "Junior Java Developer", avatar: "7.jpg", mobile: "0949976155").save(failOnError: true)
//        if (!vinhNguyenXuan.authorities.contains(userRole)) {
//            MemberRole.create vinhNguyenXuan, userRole
//        }
//
//
//        def trucTran = new Member(username: "truc.tran@axonactive.vn", password: "123456", enabled: true,
//        firstName: "Trá»±c", lastName: "Tráº§n CÆ°Æ¡ng", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "cuongtruc.tran", position: "Junior Java Developer", avatar: "9.jpg", mobile: "0933941274").save(failOnError: true)
//        if (!trucTran.authorities.contains(userRole)) {
//            MemberRole.create trucTran, userRole
//        }
//
//        def suTran = new Member(username: "su.tran@axonactive.vn", password: "123456", enabled: true,
//        firstName: "Sá»©", lastName: "Tráº§n NguyÃªn Tiáº¿n", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "trannguyentiensu", position: "Junior Java Developer", avatar: "10.jpg", mobile: "0933056722").save(failOnError: true)
//        if (!suTran.authorities.contains(userRole)) {
//            MemberRole.create suTran, userRole
//        }
//
//        def thoTran = new Member(username: "tho.tran@axonactive.vn", password: "123456", enabled: true,
//        firstName: "ThÆ¡", lastName: "Tráº§n Ngá»�c", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "tntho630", position: "Junior Java Developer", avatar: "11.jpg", mobile: "01215121359").save(failOnError: true)
//        if (!thoTran.authorities.contains(userRole)) {
//            MemberRole.create thoTran, userRole
//        }
//
//        def ngoDinh = new Member(username: "ngo.dinh@axonactive.vn", password: "123456", enabled: true,
//        firstName: "Ngá»™", lastName: "Ä�inh Minh", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "dinhminhngo91", position: "Junior Java Developer", avatar: "12.jpg", mobile: "01215121359").save(failOnError: true)
//        if (!ngoDinh.authorities.contains(userRole)) {
//            MemberRole.create ngoDinh, userRole
//        }
//
//        def cuongDo = new Member(username: "cuong.do@axonactive.vn", password: "123456", enabled: true,
//        firstName: "CÆ°á»�ng", lastName: "Ä�á»— VÄƒn", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "dvcuong05", position: "Junior Java Developer", avatar: "13.jpg", mobile: "01669300665").save(failOnError: true)
//        if (!cuongDo.authorities.contains(userRole)) {
//            MemberRole.create cuongDo, userRole
//        }
//
//        def huyTran = new Member(username: "huy.tranquoc@axonactive.vn", password: "123456", enabled: true,
//        firstName: "Huy", lastName: "Tráº§n Quá»‘c", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "tranquochuy2908", position: "Java Developer", avatar: "14.jpg", mobile: "01669300665").save(failOnError: true)
//        if (!huyTran.authorities.contains(userRole)) {
//            MemberRole.create huyTran, userRole
//        }
//
//        def vyNguyen = new Member(username: "vy.nguyen@axonactive.vn", password: "123456", enabled: false,
//        firstName: "Vy", lastName: "Nguyá»…n Thá»¥y Ã�i", gender: "Female", company: "Axon Active Vietnam", isActive: true,
//        skype: "nguyenthuyaivy", position: "Java Developer", avatar: "17.jpg", mobile: "").save(failOnError: true)
//        if (!vyNguyen.authorities.contains(userRole)) {
//            MemberRole.create vyNguyen, userRole
//        }
//
//        def tanHo = new Member(username: "tan.ho@axonactive.vn", password: "123456", enabled: false,
//        firstName: "TÃ¢n", lastName: "Há»“ Nháº­t", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "skipper_us", position: "Java Developer", avatar: "18.jpg", mobile: "").save(failOnError: true)
//        if (!tanHo.authorities.contains(userRole)) {
//            MemberRole.create tanHo, userRole
//        }
//
//        def hangDinh = new Member(username: "hang.dinh@axonactive.vn", password: "123456", enabled: false,
//        firstName: "Háº±ng", lastName: "Ä�inh Thá»‹ Minh", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "minhhangdt", position: "Java Developer", avatar: "19.jpg", mobile: "65465465413").save(failOnError: true)
//        if (!hangDinh.authorities.contains(userRole)) {
//            MemberRole.create hangDinh, userRole
//        }
//
//        def quocTran = new Member(username: "quoc.tran@axonactive.vn", password: "123456", enabled: false,
//        firstName: "Quá»‘c", lastName: "Tráº§n Báº£o", gender: "Male", company: "Axon Active Vietnam", isActive: true,
//        skype: "tbquocdh09", position: "Scrum Master/ Team Leader", avatar: "20.jpg", mobile: "564654654").save(failOnError: true)
//        if (!quocTran.authorities.contains(userRole)) {
//            MemberRole.create quocTran, userRole
//        }
//
//        def suTest = new Member(username: "testsutran@gmail.com", password: "123456", enabled: true, firstName: "Su", lastName: "Tran Nguyen Tien", gender: "Male", company: "Axon Active Vietnam", skype: "trannguyentiensu", position: "Junior Java Developer", avatar: "10.jpg", mobile: "01224986341").save(failOnError: true)
//
//        /**
//         * INIT PROJECTS MYAGILE OF SEBI
//         */
//        Project myAgile_Sebi = new Project(projectName: "My Agile", description: "Scrum project management", owner: sebi, imagePath:"scrum.png").save(failOnError: true)
//
//        /**
//         * INIT PROJECT REDMINE OF HIEULAM
//         */
//        Project redMine_Hieu = new Project(projectName: "Redmine", description: "Project management", owner: hieuLam, imagePath:"redmine.png").save(failOnError: true)
//
//        /**
//         * INIT TWO PROJECTS OF HANHNGUYEN
//         * HANHNGUYEN IS PO OF HEALTHCARE & LIFERAY
//         */
//        Project healthcare_Hanh = new Project(projectName: "Health care", description: "Improve your health condition", owner: hanhNguyen).save(failOnError: true)
//        Project lifeRay_Hanh = new Project(projectName: "Liferay", description: "Project management", owner: hanhNguyen).save(failOnError: true)
//
//
//        /**
//         * INIT 3 TEAMS OF SEBI
//         */
//        Team ant = new Team(teamName: "Ant", mailGroup: "ant@axonactive.vn", establishedDate: new Date().parse("yy-MM-dd", "2013-06-03"), owner: sebi, logo: "logo-ant.png").save(failOnError: true)
//        Team sevenUp = new Team(teamName: "7up", mailGroup: "7up@axonactive.vn", establishedDate: new Date().parse("yy-MM-dd", "2013-04-02"), owner: sebi, logo: "logo-7up.jpg").save(failOnError: true)
//        Team knight = new Team(teamName: "Knight", mailGroup: "knight@axonactive.vn", establishedDate: new Date().parse("yy-MM-dd", "2013-06-07"), owner: sebi, logo: "knight.jpg").save(failOnError: true)
//
//        /**
//         * INIT 1 TEAM OF HANHNGUYEN
//         */
//        Team bee = new Team(teamName: "Bee", mailGroup: "bee@axonactive.vn", establishedDate: new Date().parse("yy-MM-dd", "2013-06-03"), owner: hanhNguyen, logo: "bee.jpg").save(failOnError: true)
//
//        /**
//         * ASSIGN MYAGILE PROJECT TO ANT TEAM
//         */
//        Team_Project ant_myagile = new Team_Project(project: myAgile_Sebi, team: ant, startDate: new Date().parse("yy-MM-dd", "2013-06-07")).save(failOnError: true)
//        Team_Project sevenUp_myagile = new Team_Project(project: myAgile_Sebi, team: sevenUp, startDate: new Date().parse("yy-MM-dd", "2013-06-07")).save(failOnError: true)
//        Team_Project knight_myagile = new Team_Project(project: myAgile_Sebi, team: knight, startDate: new Date().parse("yy-MM-dd", "2013-06-07")).save(failOnError: true)
//
//        /**
//         * ASSIGN HEALTHCARE PROJECT TO BEE TEAM
//         */
//        Team_Project bee_healthcare = new Team_Project(project: healthcare_Hanh, team: bee, startDate: new Date().parse("yy-MM-dd", "2013-06-08")).save(failOnError: true)
//
//        /**
//         * ADD 12 MEMBERS TO TEAM ANT
//         * 1 SCRUM MASTER: huynguyen
//         * 3 MEMBERS: sutran, thotran, ngodinh NOT ACCEPTED YET
//         */
//        def antHuyNguyen = new Team_Member()
//        def antHieuLam = new Team_Member()
//        def antKhangLe = new Team_Member()
//        def antHanhNguyen = new Team_Member()
//        def antNgocNguyen = new Team_Member()
//        def antHuongNguyen = new Team_Member()
//        def antVinhNguyenXuan = new Team_Member()
//        def antVinhNguyenDang = new Team_Member()
//        def antTrucTran = new Team_Member()
//        def antSuTran = new Team_Member()
//        def antThoTran = new Team_Member()
//        def antNgoDinh = new Team_Member()
//        def antCuongDo = new Team_Member()
//
//        // Add Huy Nguyen to team ant
//        antHuyNguyen.isAccepted = true
//        antHuyNguyen.position = EnumPosition.SCRUM_MASTER
//        huyNguyen.addToTeamMembers(antHuyNguyen)
//        ant.addToTeamMembers(antHuyNguyen)
//        antHuyNguyen.save(failOnError : true)
//
//        // Add Hieu to team ant
//        antHieuLam.isAccepted = true
//        hieuLam.addToTeamMembers(antHieuLam)
//        ant.addToTeamMembers(antHieuLam)
//        antHieuLam.save(failOnError : true)
//
//        // Add Khang to team ant
//        antKhangLe.isAccepted = true
//        khangLe.addToTeamMembers(antKhangLe)
//        ant.addToTeamMembers(antKhangLe)
//        antKhangLe.save(failOnError : true)
//
//        // Add Hanh to team ant but not accepted yet
//        antHanhNguyen.isAccepted = true
//        hanhNguyen.addToTeamMembers(antHanhNguyen)
//        ant.addToTeamMembers(antHanhNguyen)
//        antHanhNguyen.save(failOnError : true)
//
//        antNgocNguyen.isAccepted = true
//        ngocNguyen.addToTeamMembers(antNgocNguyen)
//        ant.addToTeamMembers(antNgocNguyen)
//        antNgocNguyen.save(failOnError : true)
//
//        antHuongNguyen.isAccepted = true
//        huongNguyen.addToTeamMembers(antHuongNguyen)
//        ant.addToTeamMembers(antHuongNguyen)
//        antHuongNguyen.save(failOnError : true)
//
//        antVinhNguyenXuan.isAccepted = true
//        vinhNguyenXuan.addToTeamMembers(antVinhNguyenXuan)
//        ant.addToTeamMembers(antVinhNguyenXuan)
//        antVinhNguyenXuan.save(failOnError : true)
//
//        antVinhNguyenDang.isAccepted = true
//        vinhNguyenDang.addToTeamMembers(antVinhNguyenDang)
//        ant.addToTeamMembers(antVinhNguyenDang)
//        antVinhNguyenDang.save(failOnError : true)
//
//        antTrucTran.isAccepted = true
//        trucTran.addToTeamMembers(antTrucTran)
//        ant.addToTeamMembers(antTrucTran)
//        antTrucTran.save(failOnError : true)
//
//        antSuTran.isAccepted = false
//        suTran.addToTeamMembers(antSuTran)
//        ant.addToTeamMembers(antSuTran)
//        antSuTran.save(failOnError : true)
//
//        antThoTran.isAccepted = false
//        thoTran.addToTeamMembers(antThoTran)
//        ant.addToTeamMembers(antThoTran)
//        antThoTran.save(failOnError : true)
//
//        antNgoDinh.isAccepted = false
//        ngoDinh.addToTeamMembers(antNgoDinh)
//        ant.addToTeamMembers(antNgoDinh)
//        antNgoDinh.save(failOnError : true)
//
//        antCuongDo.isAccepted = true
//        cuongDo.addToTeamMembers(antCuongDo)
//        ant.addToTeamMembers(antCuongDo)
//        antCuongDo.save(failOnError : true)
//
//        /**
//         * ADD 2 MEMBERS TO TEAM KNIGHT
//         * 2 MEMBERS: knightHuyTran, knightVyNguyen
//         */
//        def knightHuyTran = new Team_Member()
//        def knightVyNguyen = new Team_Member()
//
//        // Add Huy Tran to team knight
//        knightHuyTran.isAccepted = true
//        huyTran.addToTeamMembers(knightHuyTran)
//        knight.addToTeamMembers(knightHuyTran)
//        knightHuyTran.save(failOnError : true)
//
//        // Add Hieu to team knight
//        knightVyNguyen.isAccepted = true
//        vyNguyen.addToTeamMembers(knightVyNguyen)
//        knight.addToTeamMembers(knightVyNguyen)
//        knightVyNguyen.save(failOnError : true)
//
//        /**
//         * ADD 3 MEMBERS TO TEAM 7-Up
//         * 2 MEMBERS: sevenUpTanHo, sevenUpHangDinh, sevenUpQuocTran
//         */
//        def sevenUpTanHo = new Team_Member()
//        def sevenUpHangDinh = new Team_Member()
//        def sevenUpQuocTran = new Team_Member()
//
//        // Add Tan Ho to team 7-up
//        sevenUpTanHo.isAccepted = true
//        tanHo.addToTeamMembers(sevenUpTanHo)
//        sevenUp.addToTeamMembers(sevenUpTanHo)
//        sevenUpTanHo.save(failOnError : true)
//
//        // Add Hang Dinh to team 7-up
//        sevenUpHangDinh.isAccepted = true
//        hangDinh.addToTeamMembers(sevenUpHangDinh)
//        sevenUp.addToTeamMembers(sevenUpHangDinh)
//        sevenUpHangDinh.save(failOnError : true)
//
//        // Add Quoc Tran to team 7-up
//        sevenUpQuocTran.isAccepted = true
//        quocTran.addToTeamMembers(sevenUpQuocTran)
//        sevenUpQuocTran.position = EnumPosition.SCRUM_MASTER
//        sevenUp.addToTeamMembers(sevenUpQuocTran)
//        sevenUpQuocTran.save(failOnError : true)
//
//        /**
//         * ADD 3 SPRINTS FOR ANT TEAM
//         * 2 SPRINTS HAVE BEEN CLOSED
//         */
//        Sprint antSp0 = new Sprint(sprintName: "Ant.Sprint-0", status: "closed", dateStart: new Date().parse("yy-MM-dd", "2013-06-10"), dateEnd: new Date().parse("yy-MM-dd", "2013-06-18"), team: ant).save(failOnError: true)
//        Sprint antSp1 = new Sprint(sprintName: "Ant.Sprint-1", status: "closed", dateStart: new Date().parse("yy-MM-dd", "2013-06-19"), dateEnd: new Date().parse("yy-MM-dd", "2013-06-23"), team: ant).save(failOnError: true)
//        Sprint antSp2 = new Sprint(sprintName: "Ant.Sprint-2", status: "open", dateStart: new Date().parse("yy-MM-dd", "2013-07-05"), dateEnd: new Date().parse("yy-MM-dd", "2013-07-23"), team: ant).save(failOnError: true)
//		
//		/**
//		 * ADD 1 VIDEO FOR SPRINT 0 FOR ANT TEAM
//		 */
//		MeetingVideo mv3antSp0 = new MeetingVideo(videoFileName: "demo3.mp4", meetingDate: new Date().parse("yy-MM-dd", "2013-06-10"), sprint : antSp0).save(failOnError: true);
//		
//        /**
//         * ADD 1 SPRINTS FOR KNIGHT TEAM
//         */
//        Sprint knightSp1 = new Sprint(sprintName: "Sprint-1", status: "open", dateStart: new Date().parse("yy-MM-dd", "2013-07-05"), dateEnd: new Date().parse("yy-MM-dd", "2013-08-23"), team: knight).save(failOnError: true)
//		
//		/**
//		 * ADD 1 VIDEO FOR SPRINT 1 FOR KNIGHT TEAM
//		 */
//		MeetingVideo mv1knightSp1 = new MeetingVideo(videoFileName: "demo1.mp4", meetingDate: new Date().parse("yy-MM-dd", "2013-07-05"), sprint : knightSp1).save(failOnError: true);
//        MeetingVideo mv2knightSp1 = new MeetingVideo(videoFileName: "demo2.mp4", meetingDate: new Date().parse("yy-MM-dd", "2013-07-06"), sprint : knightSp1).save(failOnError: true);
//       
//		
//        /**
//         * ADD 1 SPRINTS FOR SEVENUP TEAM
//         */
//        Sprint sevenUpSp1 = new Sprint(sprintName: "Sprint-1", status: "open", dateStart: new Date().parse("yy-MM-dd", "2013-07-05"), dateEnd: new Date().parse("yy-MM-dd", "2013-08-23"), team: sevenUp).save(failOnError: true)
//
//        /**
//         * ADD 11 RETROSPECTIVE RECORDS FOR TEAM ANT
//         * 2 SPRINTS HAVE BEEN CLOSED
//         */
//        RetrospectiveResult antSp0Im0 = new RetrospectiveResult(type: "unhappy", description: "So confused", status: "Unsolved", sprint: antSp0, project: myAgile_Sebi, date: new Date("06/11/2013"), owner : khangLe).save(failOnError: false)
//        RetrospectiveResult antSp0Im1 = new RetrospectiveResult(type: "unhappy", description: "So confused", status: "Unsolved", sprint: antSp0, project: myAgile_Sebi, date: new Date("06/10/2013"), owner : khangLe).save(failOnError: false)
//        RetrospectiveResult antSp0Im2 = new RetrospectiveResult(type: "happy", description: "Task solved", sprint: antSp0, project: myAgile_Sebi, date: new Date("06/05/2013"), owner : khangLe).save(failOnError: false)
//        RetrospectiveResult antSp0Im3 = new RetrospectiveResult(type: "hapyy", description: "Having coffee", sprint: antSp0, project: myAgile_Sebi, date: new Date("06/30/2013"), owner : trucTran).save(failOnError: false)
//        RetrospectiveResult antSp1Im0 = new RetrospectiveResult(type: "unhappy", description: "So confused", status: "Unsolved", sprint: antSp1, project: myAgile_Sebi, date: new Date("06/15/2013"), owner : trucTran).save(failOnError: false)
//        RetrospectiveResult antSp1Im1 = new RetrospectiveResult(type: "unhappy", description: "So confused", status: "Solved", sprint: antSp1, project: myAgile_Sebi, date: new Date("06/11/2013"), owner : trucTran).save(failOnError: false)
//        RetrospectiveResult antSp2Im0 = new RetrospectiveResult(type: "unhappy", description: "So confused", status: "Unsolved", sprint: antSp2, project: myAgile_Sebi, date: new Date("06/10/2013"), owner : thoTran).save(failOnError: false)
//        RetrospectiveResult antSp2Im1 = new RetrospectiveResult(type: "suggest", description: "More time", sprint: antSp2, project: myAgile_Sebi, date: new Date("06/09/2013"), owner : thoTran).save(failOnError: false)
//        RetrospectiveResult antSp2Im2 = new RetrospectiveResult(type: "suggest", description: "Lunch together", sprint: antSp2, project: myAgile_Sebi, date: new Date("16/08/2013"), owner : ngocNguyen).save(failOnError: false)
//        RetrospectiveResult antSp2Im3 = new RetrospectiveResult(type: "suggest", description: "IntelliJ", sprint: antSp2, project: myAgile_Sebi, date: new Date("06/03/2013"), owner : ngocNguyen).save(failOnError: false)
//        RetrospectiveResult antSp2Im4 = new RetrospectiveResult(type: "suggest", description: "Webstorm", sprint: antSp2, project: myAgile_Sebi, date: new Date("16/06/2013"), owner : hanhNguyen).save(failOnError: false)
//
//        /**
//         * ADD 4 RETROSPECTIVE RECORDS FOR TEAM KNIGHT
//         */
//        RetrospectiveResult knightSp1Im0 = new RetrospectiveResult(type: "unhappy", description: "Knight: So confused", status: "Unsolved", sprint: knightSp1, project: myAgile_Sebi, date: new Date("06/10/2013"), owner : vyNguyen).save(failOnError: false)
//        RetrospectiveResult knightSp1Im1 = new RetrospectiveResult(type: "suggest", description: "Knight: More time", sprint: knightSp1, project: myAgile_Sebi, date: new Date("06/09/2013"), owner : vyNguyen).save(failOnError: false)
//        RetrospectiveResult knightSp1Im2 = new RetrospectiveResult(type: "unhappy", description: "Knight: Lunch together", sprint: knightSp1, project: myAgile_Sebi, date: new Date("16/08/2013"), owner : huyTran).save(failOnError: false)
//        RetrospectiveResult knightSp1Im3 = new RetrospectiveResult(type: "suggest", description: "Knight: IntelliJ", sprint: knightSp1, project: myAgile_Sebi, date: new Date("06/03/2013"), owner : vyNguyen).save(failOnError: false)
//        RetrospectiveResult knightSp1Im4 = new RetrospectiveResult(type: "unhappy", description: "Knight: Webstorm", sprint: knightSp1, project: myAgile_Sebi, date: new Date("16/06/2013"), owner : vyNguyen).save(failOnError: false)
//
//        /**
//         * ADD 4 RETROSPECTIVE RECORDS FOR TEAM SEVENUP
//         */
//        RetrospectiveResult sevenUpSp1Im0 = new RetrospectiveResult(type: "unhappy", description: "SevenUp: So confused", status: "Unsolved", sprint: sevenUpSp1, project: myAgile_Sebi, date: new Date("06/10/2013"), owner : tanHo).save(failOnError: false)
//        RetrospectiveResult sevenUpSp1Im1 = new RetrospectiveResult(type: "suggest", description: "SevenUp: More time", sprint: sevenUpSp1, project: myAgile_Sebi, date: new Date("06/09/2013"), owner : tanHo).save(failOnError: false)
//        RetrospectiveResult sevenUpSp1Im2 = new RetrospectiveResult(type: "unhappy", description: "SevenUp: Lunch together", sprint: sevenUpSp1, project: myAgile_Sebi, date: new Date("16/08/2013"), owner : tanHo).save(failOnError: false)
//        RetrospectiveResult sevenUpSp1Im3 = new RetrospectiveResult(type: "unhappy", description: "SevenUp: IntelliJ", sprint: sevenUpSp1, project: myAgile_Sebi, date: new Date("06/03/2013"), owner : tanHo).save(failOnError: false)
//        RetrospectiveResult sevenUpSp1Im4 = new RetrospectiveResult(type: "suggest", description: "SevenUp: Webstorm", sprint: sevenUpSp1, project: myAgile_Sebi, date: new Date("16/06/2013"), owner : tanHo).save(failOnError: false)
//
//        /**
//         * ADD 6 STATUS IN KANBAN FOR TEAM ANT
//         * IN SPRINT 0
//         */
//        def sp0toDo = new Status(name: "To do",color:'#368EE0', position: 1, hidden: false, start: true, done: false, team: ant, sprint: antSp0).save(failOnError: true)
//        def sp0progress = new Status(name: "Progress",color:'#368EE0', position: 2, hidden: false, start: false, done: false, team: ant, sprint: antSp0).save(failOnError: true)
//        def sp0block = new Status(name: "Block",color:'#368EE0', position: 3, hidden: false, start: false, done: false, team: ant, sprint: antSp0).save(failOnError: true)
//        def sp0verify = new Status(name: "Verify",color:'#368EE0', position: 4, hidden: false, start: false, done: false, team: ant, sprint: antSp0).save(failOnError: true)
//        def sp0done = new Status(name: "Done",color:'#368EE0', position: 5, hidden: false, start: false, done: true, team: ant, sprint: antSp0).save(failOnError: true)
//        def sp0stvoid = new Status(name: "Void",color:'#368EE0', position: 6, hidden: false, start: false, done: false, team: ant, sprint: antSp0).save(failOnError: true)
//
//        /**
//         * ADD 6 STATUS IN KANBAN FOR TEAM ANT
//         * IN SPRINT 1
//         */
//        def sp1toDo = new Status(name: "To do",color:'#368EE0', position: 1, hidden: false, start: true, done: false, team: ant, sprint: antSp1).save(failOnError: true)
//        def sp1progress = new Status(name: "Progress",color:'#368EE0', position: 2, hidden: false, start: false, done: false, team: ant, sprint: antSp1).save(failOnError: true)
//        def sp1done = new Status(name: "Done",color:'#368EE0', position: 5, hidden: false, start: false, done: true, team: ant, sprint: antSp1).save(failOnError: true)
//
//        /**
//         * ADD 6 STATUS IN KANBAN FOR TEAM ANT
//         * IN SPRINT 2
//         */
//        def sp2toDo = new Status(name: "To do",color:'#368EE0', position: 1, hidden: false, start: true, done: false, team: ant, sprint: antSp2).save(failOnError: true)
//        def sp2progress = new Status(name: "Progress",color:'#368EE0', position: 2, hidden: false, start: false, done: false, team: ant, sprint: antSp2).save(failOnError: true)
//        def sp2verify = new Status(name: "Verify",color:'#368EE0', position: 4, hidden: false, start: false, done: false, team: ant, sprint: antSp2).save(failOnError: true)
//        def sp2done = new Status(name: "Done",color:'#368EE0', position: 5, hidden: false, start: false, done: true, team: ant, sprint: antSp2).save(failOnError: true)
//
//
//        /**
//         * ADD 6 STATUS IN KANBAN FOR TEAM KNIGHT
//         * IN SPRINT 1
//         */
//        def knighttoDo = new Status(name: "To do",color:'#368EE0', position: 1, hidden: false, start: true, done: false, team: knight, sprint: knightSp1).save(failOnError: true)
//        def knightdone = new Status(name: "Done",color:'#368EE0', position: 5, hidden: false, start: false, done: true, team: knight, sprint: knightSp1).save(failOnError: true)
//
//
//        /**
//         * ADD 6 STATUS IN KANBAN FOR TEAM 7UP
//         * IN SPRINT 1
//         */
//        def sevenUptoDo = new Status(name: "To do",color:'#368EE0', position: 1, hidden: false, start: true, done: false, team: sevenUp, sprint: sevenUpSp1).save(failOnError: true)
//        def sevenUpdone = new Status(name: "Done",color:'#368EE0', position: 5, hidden: false, start: false, done: true, team: sevenUp, sprint: sevenUpSp1).save(failOnError: true)
//
//        /**
//         * ADD 9 USERS STORY FOR MYAGILE PROJECT
//         * 2 SPRINTS HAVE BEEN CLOSED
//         */
//        UserStory myagile_Us0 = new UserStory(name: "Many teams on the same project", description: "As a PO, I want to have possibility for more than one team that work on the same project.", value: 12, status: "to-do", project: myAgile_Sebi).save(failOnError: true)
//        UserStory myagile_Us1 = new UserStory(name: "Product, Sprint, Impediment backlogs", description: "As a scrum team, I want get three backlogs available: Product backlog, Sprint backlog, Impediment backlog", value: 6, status: "in-progress", project: myAgile_Sebi).save(failOnError: true)
//        UserStory myagile_Us2 = new UserStory(name: "Manage team", description: "As a user, I want to setup my team and manage my team (email, birthday, team-name, logo", value: 2, status: "done", project: myAgile_Sebi).save(failOnError: true)
//        UserStory myagile_Us3 = new UserStory(name: "Team can work several projects", description: "As a PO, I want that one team can work on several projects. Can i see one overall burndown of a sprint, Can I see subburndown of project.", value: 20, status: "in-progress", project: myAgile_Sebi).save(failOnError: true)
//        UserStory myagile_Us4 = new UserStory(name: "Access team infomation", description: "As a stakeholder I want to have access to infomation of my team.", value: 5, status: "done", project: myAgile_Sebi).save(failOnError: true)
//        UserStory myagile_Us5 = new UserStory(name: "Whose task", description: "Can I see whose Tasks in the backlog.", value: 6, status: "to-do", project: myAgile_Sebi).save(failOnError: true)
//        UserStory myagile_Us6 = new UserStory(name: "Define kanban", description: "As a team I want to define my own KANBAN fields (default: To do, In progress, Done.", value: 5, status: "in-progress", project: myAgile_Sebi).save(failOnError: true)
//        UserStory myagile_Us7 = new UserStory(name: "Export sprint to PDF", description: "As a scrum team, I want to export the sprint card to PDF or Word..so that I can out and stick on task board.", value: 8, status: "done", project: myAgile_Sebi).save(failOnError: true)
//        UserStory myagile_Us8 = new UserStory(name: "Move, copy requirement", description: "As a user, I would like lto move, copy a requirement to any other backlog.", value: 9, status: "to-do", project: myAgile_Sebi).save(failOnError: true)
//        UserStory myagile_Us9 = new UserStory(name: "Burndown data", description: "As a team, I want the burndown can also track the history based on: Sprint size (week), Available man day, Team size, Point planed, Point done, Velocity of sprint, Points done per persion and velocity per person so that I also have the possibility to inscrease the productivity.", value: 20, status: "in-progress", project: myAgile_Sebi).save(failOnError: true)
//
//        /**
//         * INIT ISSUE IN SPRINT FOR ANT TEAM
//         */
//        def sp0is1 = new Issue(type:"UserStory", subject:"Many teams on the same project", description:"Many teams on the same project", status:sp0toDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:antSp0, userStory: myagile_Us0).save(failOnError:true)
//        def sp0is2 = new Issue(type:"Task", subject:"Drag & Drop in backlog", description:"Drag & Drop US from product backlog to sprint backlog", status:sp0toDo, priority:"Should", estimate:"D5T3", remain:"D2T1", sprint:antSp0, userStory: myagile_Us1).save(failOnError:true)
//        def sp0is3 = new Issue(type:"Task", subject:"Sub userstory", description:"A userstory can have many subuserstory", status:sp0toDo, priority:"Could", estimate:"D5T3", remain:"D2T1", sprint:antSp0, userStory: myagile_Us1).save(failOnError:true)
//        def sp0is4 = new Issue(type:"Bug", subject:"Cannot create a team", description:"When click on save button, errror occur.", status:sp0progress, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:antSp0, userStory: myagile_Us1).save(failOnError:true)
//        def sp0is5 = new Issue(type:"Task", subject:"Export sprint to PDF", description:"As a scrum team, I want to export the sprint card to PDF or Word..so that I can out and stick on task board.", status:sp0toDo, priority:"Should", estimate:"D5T3", remain:"D2T1", sprint:antSp0, userStory: myagile_Us7).save(failOnError:true)
//        def sp0is6 = new Issue(type:"UserStory", subject:"Epic Userstory", description:"An epic userstory can do in many sprint", status:sp0progress, priority:"Should", estimate:"D5T3", remain:"D2T1", sprint:antSp0, userStory: myagile_Us1).save(failOnError:true)
//
//        def sp1is1 = new Issue(type:"Task", subject:"Burndown update", description:"Burndown update automatically when change remain point", status:sp1toDo, priority:"Wont", estimate:"D5T3", remain:"D2T1", sprint:antSp1, userStory: myagile_Us1).save(failOnError:true)
//        def sp1is2 = new Issue(type:"Bug", subject:"Cannot update team avatar", description:"When click on save button, errror occur.", status:sp1progress, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:antSp1, userStory: myagile_Us1).save(failOnError:true)
//        def sp1is3 = new Issue(type:"Task", subject:"Burndown can track history", description:"Burndown can track history", status:sp1toDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:antSp1, userStory: myagile_Us2).save(failOnError:true)
//        def sp1is4 = new Issue(type:"Task", subject:"Team can work several projects", description:"As a PO, I want that one team can work on several projects. Can i see one overall burndown of a sprint, Can I see subburndown of project.", status:sp1progress, priority:"Could", estimate:"D5T3", remain:"D2T1", sprint:antSp1, userStory: myagile_Us1).save(failOnError:true)
//
//        def sp2is1 = new Issue(type:"Task", subject:"Sub burndown", description:"Sub burndown to show projects in sprint", status:sp2toDo, priority:"Should", estimate:"D5T3", remain:"D2T1", sprint:antSp2, userStory: myagile_Us9).save(failOnError:true)
//        def sp2is2 = new Issue(type:"Task", subject:"Move, copy requirement", description:"As a user, I would like lto move, copy a requirement to any other backlog.", status:sp2toDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:antSp2, userStory: myagile_Us8).save(failOnError:true)
//        def sp2is3 = new Issue(type:"Bug", subject:"Kanban edit field", description:"User can define his own field", status:sp2toDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:antSp2, userStory: myagile_Us6).save(failOnError:true)
//        def sp2is4 = new Issue(type:"Bug", subject:"Assigned to member in kanban", description:"Wrong ajax call", status:sp2toDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:antSp2, userStory: myagile_Us6).save(failOnError:true)
//        def sp2is5 = new Issue(type:"Task", subject:"Drag & Drop in kanban", description:"User can change status of issue by drag & drop", status:sp2toDo, priority:"Would", estimate:"D5T3", remain:"D2T1", sprint:antSp2, userStory: myagile_Us6).save(failOnError:true)
//        def sp2is6 = new Issue(type:"Task", subject:"Subissue", description:"Support for sub issue", status:sp2toDo, priority:"Should", estimate:"D5T3", remain:"D2T1", sprint:antSp2, userStory: myagile_Us6).save(failOnError:true)
//        def sp2is7 = new Issue(type:"Task", subject:"Comment on issue", description:"As a user, I can commment on an issue", status:sp2done, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:antSp2, userStory: myagile_Us6).save(failOnError:true)
//        def sp2is8 = new Issue(type:"Task", subject:"Drag & Drop in backlog", description:"Drag & Drop US from product backlog to sprint backlog", status:sp2toDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:antSp2, userStory: myagile_Us1).save(failOnError:true)
//        def sp2is9 = new Issue(type:"Task", subject:"Sub userstory", description:"A userstory can have many subuserstory", status:sp2toDo, priority:"Wont", estimate:"D5T3", remain:"D2T1", sprint:antSp2, userStory: myagile_Us1).save(failOnError:true)
//        def sp2is10 = new Issue(type:"Bug", subject:"Cannot create a team", description:"When click on save button, errror occur.", status:sp2toDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:antSp2, userStory: myagile_Us1).save(failOnError:true)
//
//        /**
//         * INIT ISSUE IN SPRINT FOR KNIGHT TEAM
//         */
//        def knightSp1is1 = new Issue(type:"Bug", subject:"Knight: Kanban edit field", description:"User can define his own field", status:knighttoDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:knightSp1, userStory: myagile_Us6).save(failOnError:true)
//        def knightSp1is2 = new Issue(type:"Bug", subject:"Knight: Assigned to member in kanban", description:"Wrong ajax call", status:knighttoDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:knightSp1, userStory: myagile_Us6).save(failOnError:true)
//        def knightSp1is3 = new Issue(type:"Task", subject:"Knight: Drag & Drop in kanban", description:"User can change status of issue by drag & drop", status:sp2toDo, priority:"Would", estimate:"D5T3", remain:"D2T1", sprint:knightSp1, userStory: myagile_Us6).save(failOnError:true)
//        def knightSp1is4 = new Issue(type:"Task", subject:"Knight: Subissue", description:"Support for sub issue", status:knighttoDo, priority:"Should", estimate:"D5T3", remain:"D2T1", sprint:knightSp1, userStory: myagile_Us6).save(failOnError:true)
//        def knightSp1is5 = new Issue(type:"Task", subject:"Knight: Comment on issue", description:"As a user, I can commment on an issue", status:knightdone, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:knightSp1, userStory: myagile_Us6).save(failOnError:true)
//        def knightSp1is6 = new Issue(type:"Task", subject:"Knight: Drag & Drop in backlog", description:"Drag & Drop US from product backlog to sprint backlog", status:knighttoDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:knightSp1, userStory: myagile_Us1).save(failOnError:true)
//        def knightSp1is7 = new Issue(type:"Task", subject:"Knight: Sub userstory", description:"A userstory can have many subuserstory", status:knighttoDo, priority:"Wont", estimate:"D5T3", remain:"D2T1", sprint:knightSp1, userStory: myagile_Us1).save(failOnError:true)
//        def knightSp1is8 = new Issue(type:"Bug", subject:"Knight: Cannot create a team", description:"When click on save button, errror occur.", status:knighttoDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:knightSp1, userStory: myagile_Us1).save(failOnError:true)
//
//        /**
//         * INIT ISSUE IN SPRINT FOR SEVENUP TEAM
//         */
//        def sevenUpSp1is1 = new Issue(type:"Bug", subject:"7up: Kanban edit field", description:"User can define his own field", status:sevenUptoDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:sevenUpSp1, userStory: myagile_Us6).save(failOnError:true)
//        def sevenUpSp1is2 = new Issue(type:"Bug", subject:"7up: Assigned to member in kanban", description:"Wrong ajax call", status:sevenUptoDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:sevenUpSp1, userStory: myagile_Us6).save(failOnError:true)
//        def sevenUpSp1is3 = new Issue(type:"Task", subject:"7up: Drag & Drop in kanban", description:"User can change status of issue by drag & drop", status:sp2toDo, priority:"Would", estimate:"D5T3", remain:"D2T1", sprint:sevenUpSp1, userStory: myagile_Us6).save(failOnError:true)
//        def sevenUpSp1is4 = new Issue(type:"Task", subject:"7up: Subissue", description:"Support for sub issue", status:sevenUptoDo, priority:"Should", estimate:"D5T3", remain:"D2T1", sprint:sevenUpSp1, userStory: myagile_Us6).save(failOnError:true)
//        def sevenUpSp1is5 = new Issue(type:"Task", subject:"7up: Comment on issue", description:"As a user, I can commment on an issue", status:sevenUpdone, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:sevenUpSp1, userStory: myagile_Us6).save(failOnError:true)
//        def sevenUpSp1is6 = new Issue(type:"Task", subject:"7up: Drag & Drop in backlog", description:"Drag & Drop US from product backlog to sprint backlog", status:sevenUptoDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:sevenUpSp1, userStory: myagile_Us1).save(failOnError:true)
//        def sevenUpSp1is7 = new Issue(type:"Task", subject:"7up: Sub userstory", description:"A userstory can have many subuserstory", status:sevenUptoDo, priority:"Wont", estimate:"D5T3", remain:"D2T1", sprint:sevenUpSp1, userStory: myagile_Us1).save(failOnError:true)
//        def sevenUpSp1is8 = new Issue(type:"Bug", subject:"7up: Cannot create a team", description:"When click on save button, errror occur.", status:sevenUptoDo, priority:"Must", estimate:"D5T3", remain:"D2T1", sprint:sevenUpSp1, userStory: myagile_Us1).save(failOnError:true)
//
//        /**
//         * INIT POINT IN SPRINT FOR ANT TEAM
//         */
//        //IN SPRINT 0
//        def sp0is1pr1 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-10"),pointRemain: "D5T3", issue: sp0is1).save(failOnError:true)
//        def sp0is2pr1 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-10"),pointRemain: "D8T3", issue: sp0is2).save(failOnError:true)
//        def sp0is3pr1 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-10"),pointRemain: "D13T3", issue: sp0is3).save(failOnError:true)
//        def sp0is5pr1 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-10"),pointRemain: "D5T3", issue: sp0is5).save(failOnError:true)
//
//        def sp0is1pr2 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-11"),pointRemain: "D4T3", issue: sp0is1).save(failOnError:true)
//        def sp0is2pr2 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-11"),pointRemain: "D7T3", issue: sp0is2).save(failOnError:true)
//        def sp0is3pr2 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-11"),pointRemain: "D12T3", issue: sp0is3).save(failOnError:true)
//        def sp0is5pr2 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-11"),pointRemain: "D4T3", issue: sp0is5).save(failOnError:true)
//
//        def sp0is1pr3 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-12"),pointRemain: "D3T3", issue: sp0is1).save(failOnError:true)
//        def sp0is2pr3 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-12"),pointRemain: "D5T3", issue: sp0is2).save(failOnError:true)
//        def sp0is3pr3 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-12"),pointRemain: "D5T3", issue: sp0is3).save(failOnError:true)
//        def sp0is5pr3 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-12"),pointRemain: "D3T3", issue: sp0is5).save(failOnError:true)
//
//        def sp0is1pr4 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-13"),pointRemain: "D0T3", issue: sp0is1).save(failOnError:true)
//        def sp0is2pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-13"),pointRemain: "D4T3", issue: sp0is2).save(failOnError:true)
//        def sp0is3pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-13"),pointRemain: "D0T3", issue: sp0is3).save(failOnError:true)
//        def sp0is4pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-13"),pointRemain: "D3T1", issue: sp0is4).save(failOnError:true) //a bug occured
//        def sp0is5pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-13"),pointRemain: "D1T3", issue: sp0is5).save(failOnError:true)
//
//        def sp0is1pr5=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-14"),pointRemain: "D0T0", issue: sp0is1).save(failOnError:true) //issue done
//        def sp0is2pr5=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-14"),pointRemain: "D3T3", issue: sp0is2).save(failOnError:true)
//        def sp0is3pr5=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-14"),pointRemain: "D0T0", issue: sp0is3).save(failOnError:true)
//        def sp0is4pr5 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-14"),pointRemain: "D0T3", issue: sp0is4).save(failOnError:true)
//        def sp0is5pr5 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-14"),pointRemain: "D0T3", issue: sp0is5).save(failOnError:true)
//
//        def sp0is2pr6=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-15"),pointRemain: "D0T3", issue: sp0is2).save(failOnError:true)
//        def sp0is4pr6=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-15"),pointRemain: "D0T0", issue: sp0is4).save(failOnError:true)
//        def sp0is5pr6=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-15"),pointRemain: "D0T2", issue: sp0is5).save(failOnError:true)
//
//        def sp0is2pr7=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-16"),pointRemain: "D0T2", issue: sp0is2).save(failOnError:true)
//        def sp0is4pr7=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-16"),pointRemain: "D0T0", issue: sp0is4).save(failOnError:true)
//        def sp0is5pr7=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-16"),pointRemain: "D0T1", issue: sp0is5).save(failOnError:true)
//
//        def sp0is2pr8=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-17"),pointRemain: "D0T1", issue: sp0is2).save(failOnError:true)
//
//        def sp0is2pr9=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-18"),pointRemain: "D0T0", issue: sp0is2).save(failOnError:true)
//        def sp0is5pr9=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-18"),pointRemain: "D0T0", issue: sp0is5).save(failOnError:true)
//
//        //IN SPRINT 1
//        def sp1is1pr1 =new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-19"),pointRemain: "D3T3", issue: sp1is1).save(failOnError:true)
//        def sp1is3pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-19"),pointRemain: "D5T3", issue: sp1is3).save(failOnError:true)
//
//        def sp1is1pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-20"),pointRemain: "D1T3", issue: sp1is1).save(failOnError:true)
//        def sp1is2pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-20"),pointRemain: "D3T1", issue: sp1is2).save(failOnError:true)// a bug occured
//        def sp1is3pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-20"),pointRemain: "D3T3", issue: sp1is3).save(failOnError:true)
//
//        def sp1is1pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-21"),pointRemain: "D0T3", issue: sp1is1).save(failOnError:true)
//        def sp1is2pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-21"),pointRemain: "D1T1", issue: sp1is2).save(failOnError:true)
//        def sp1is3pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-21"),pointRemain: "D1T3", issue: sp1is3).save(failOnError:true)
//
//        def sp1is1pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-22"),pointRemain: "D0T0", issue: sp1is1).save(failOnError:true)
//        def sp1is2pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-22"),pointRemain: "D0T1", issue: sp1is2).save(failOnError:true)
//        def sp1is3pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-22"),pointRemain: "D0T3", issue: sp1is3).save(failOnError:true)
//
//        def sp1is2pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-23"),pointRemain: "D0T0", issue: sp1is2).save(failOnError:true)
//        def sp1is3pr5=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-23"),pointRemain: "D0T1", issue: sp1is3).save(failOnError:true)
//
//        def sp1is3pr6=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-06-23"),pointRemain: "D0T0", issue: sp1is3).save(failOnError:true)
//
//        //IN SPRINT 2
//        def sp2is1pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-05"),pointRemain: "D5T1", issue: sp2is1).save(failOnError:true)
//        def sp2is2pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-05"),pointRemain: "D8T0", issue: sp2is2).save(failOnError:true)
//        def sp2is5pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-05"),pointRemain: "D2T2", issue: sp2is5).save(failOnError:true)
//        def sp2is6pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-05"),pointRemain: "D3T1", issue: sp2is6).save(failOnError:true)
//        def sp2is7pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-05"),pointRemain: "D1T1", issue: sp2is7).save(failOnError:true)
//
//        def sp2is1pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-06"),pointRemain: "D4T1", issue: sp2is1).save(failOnError:true)
//        def sp2is2pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-06"),pointRemain: "D6T0", issue: sp2is2).save(failOnError:true)
//        def sp2is5pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-06"),pointRemain: "D1T2", issue: sp2is5).save(failOnError:true)
//        def sp2is6pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-06"),pointRemain: "D1T1", issue: sp2is6).save(failOnError:true)
//        def sp2is7pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-06"),pointRemain: "D0T1", issue: sp2is7).save(failOnError:true)
//
//        def sp2is1pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-07"),pointRemain: "D3T1", issue: sp2is1).save(failOnError:true)
//        def sp2is2pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-07"),pointRemain: "D5T0", issue: sp2is2).save(failOnError:true)
//        def sp2is5pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-07"),pointRemain: "D0T2", issue: sp2is5).save(failOnError:true)
//        def sp2is6pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-07"),pointRemain: "D0T1", issue: sp2is6).save(failOnError:true)
//        def sp2is7pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-07"),pointRemain: "D0T0", issue: sp2is7).save(failOnError:true)// Issue 7 Done
//
//        def sp2is1pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-08"),pointRemain: "D2T1", issue: sp2is1).save(failOnError:true)
//        def sp2is2pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-08"),pointRemain: "D4T0", issue: sp2is2).save(failOnError:true)
//        def sp2is5pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-08"),pointRemain: "D0T1", issue: sp2is5).save(failOnError:true)
//        def sp2is6pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-08"),pointRemain: "D0T0", issue: sp2is6).save(failOnError:true)// Issue 6 Done
//        def sp2is3pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-08"),pointRemain: "D3T0", issue: sp2is3).save(failOnError:true)// Bug 3 Start
//
//        def sp2is1pr5=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-09"),pointRemain: "D1T1", issue: sp2is1).save(failOnError:true)
//        def sp2is2pr5=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-09"),pointRemain: "D2T0", issue: sp2is2).save(failOnError:true)
//        def sp2is5pr5=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-09"),pointRemain: "D0T0", issue: sp2is5).save(failOnError:true)// Issue 5 Done
//        def sp2is8pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-09"),pointRemain: "D9T2", issue: sp2is8).save(failOnError:true)// Issue 8 Start
//        def sp2is3pr5=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-09"),pointRemain: "D2T0", issue: sp2is3).save(failOnError:true)
//
//        def sp2is1pr6=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-10"),pointRemain: "D0T1", issue: sp2is1).save(failOnError:true)
//        def sp2is2pr6=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-10"),pointRemain: "D1T0", issue: sp2is2).save(failOnError:true)
//        def sp2is4pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-10"),pointRemain: "D4T2", issue: sp2is4).save(failOnError:true)// Bug 4 occur
//        def sp2is8pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-10"),pointRemain: "D8T2", issue: sp2is8).save(failOnError:true)
//        def sp2is3pr6=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-10"),pointRemain: "D1T0", issue: sp2is3).save(failOnError:true)
//
//        def sp2is1pr7=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-11"),pointRemain: "D0T0", issue: sp2is1).save(failOnError:true)// Issue 1 Done
//        def sp2is2pr7=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-11"),pointRemain: "D0T0", issue: sp2is2).save(failOnError:true)// Issue 2 Done
//        def sp2is4pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-11"),pointRemain: "D3T2", issue: sp2is4).save(failOnError:true)
//        def sp2is8pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-11"),pointRemain: "D6T2", issue: sp2is8).save(failOnError:true)
//        def sp2is3pr7=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-11"),pointRemain: "D1T0", issue: sp2is3).save(failOnError:true)
//
//        def sp2is9pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-12"),pointRemain: "D5T0", issue: sp2is9).save(failOnError:true)// Issue 9 Start
//        def sp2is10pr1=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-12"),pointRemain: "D5T2", issue: sp2is10).save(failOnError:true)// Issue 10 Start
//        def sp2is4pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-12"),pointRemain: "D2T2", issue: sp2is4).save(failOnError:true)
//        def sp2is8pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-12"),pointRemain: "D3T2", issue: sp2is8).save(failOnError:true)
//        def sp2is3pr8=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-12"),pointRemain: "D0T0", issue: sp2is3).save(failOnError:true)//Issue 8 Done
//
//        def sp2is9pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-13"),pointRemain: "D4T0", issue: sp2is9).save(failOnError:true)
//        def sp2is10pr2=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-13"),pointRemain: "D4T2", issue: sp2is10).save(failOnError:true)
//        def sp2is4pr4=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-13"),pointRemain: "D1T2", issue: sp2is4).save(failOnError:true)
//        def sp2is8pr5=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-13"),pointRemain: "D1T2", issue: sp2is8).save(failOnError:true)
//
//        def sp2is9pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-14"),pointRemain: "D3T0", issue: sp2is9).save(failOnError:true)
//        def sp2is10pr3=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-14"),pointRemain: "D3T2", issue: sp2is10).save(failOnError:true)
//        //Issue 4 not update
//        def sp2is8pr6=new PointRemain(dateUpdate: new Date().parse("yy-MM-dd", "2013-07-14"),pointRemain: "D0T0", issue: sp2is8).save(failOnError:true)
//		
    }

    def destroy = {
    }
}

